// PaintingUtility.cpp: implementation of the PaintingUtility class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PaintingUtility.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

PaintingUtility::PaintingUtility()
{
}

PaintingUtility::~PaintingUtility()
{
}

void PaintingUtility::PaintBitmap(CDC& dc, const CPoint& point, UINT nBitmapId)
{
	CDC dcMem;
	dcMem.CreateCompatibleDC(&dc);
	CBitmap bitmap;
	bitmap.LoadBitmap(nBitmapId);
	dcMem.SelectObject(&bitmap);
	BITMAP bmp;
	bitmap.GetBitmap(&bmp);
	dc.BitBlt(point.x, point.y, bmp.bmWidth, bmp.bmHeight, &dcMem, 0, 0, SRCCOPY);
	dcMem.DeleteDC();
}